package com.yingside.collection;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

public class TestProperties {
    public static void main(String[] args) throws IOException {
        //读取系统属性内容
        /*Properties pps = System.getProperties();
        //pps.list(System.out);
        String property = pps.getProperty("user.dir");
        System.out.println("property = " + property);*/

        Properties pps = new Properties();
        pps.load(new FileInputStream("jdbc.properties"));

        String username = pps.getProperty("username");
        System.out.println("username = " + username);
    }
}
